﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="EditPurchases.aspx.cs" Inherits="TicketingCompany.Admin.EditPurchases" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager runat="server" />

    <telerik:RadGrid ID="RadGridPurchases" runat="server" AllowFilteringByColumn="True"
        CellSpacing="0" DataSourceID="EntityDataSourcePurchases" GridLines="None" AllowPaging="True"
        AllowSorting="True" AutoGenerateEditColumn="True" 
        AllowAutomaticInserts="True">
        <ItemStyle />
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="PurchaseID" DataSourceID="EntityDataSourcePurchases">
            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="PurchaseID" DataType="System.Int32" FilterControlAltText="Filter PurchaseID column"
                    HeaderText="PurchaseID" ReadOnly="True" SortExpression="PurchaseID" UniqueName="PurchaseID">
                </telerik:GridBoundColumn>

                <%--<telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Is Delivered?">
                    <ItemTemplate>
                        <asp:CheckBox Text="Delivered" runat="server" ID='CheckBoxIsDeliver' Checked='<%# Bind("Delivered") %>' AutoPostBack="true"/>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>--%>

                <telerik:GridBoundColumn DataField="EventID" FilterControlAltText="Filter EventID column"
                    HeaderText="EventID" SortExpression="EventID" UniqueName="EventID" 
                    DataType="System.Int32">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CustomerName" FilterControlAltText="Filter CustomerName column"
                    HeaderText="CustomerName" SortExpression="CustomerName" 
                    UniqueName="CustomerName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="NumberOfTickets" FilterControlAltText="Filter NumberOfTickets column"
                    HeaderText="NumberOfTickets" SortExpression="NumberOfTickets" 
                    UniqueName="NumberOfTickets" DataType="System.Int32">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ShippingAddress" 
                    FilterControlAltText="Filter ShippingAddress column" 
                    HeaderText="ShippingAddress" SortExpression="ShippingAddress" 
                    UniqueName="ShippingAddress">
                </telerik:GridBoundColumn>
                <telerik:GridCheckBoxColumn ReadOnly="false" DataField="Delivered" DataType="System.Boolean" 
                    HeaderText="Delivered" SortExpression="Delivered" UniqueName="Delivered">
                </telerik:GridCheckBoxColumn>                
            </Columns>
           
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
           
        </MasterTableView>
        
<FilterMenu EnableImageSprites="False"></FilterMenu>

<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
        
    </telerik:RadGrid>

    <asp:EntityDataSource ID="EntityDataSourcePurchases" runat="server" ConnectionString="name=TicketingCompanyEntities"
        DefaultContainerName="TicketingCompanyEntities" EnableFlattening="False" EnableUpdate="True"
        EntitySetName="Purchases" EnableInsert="True">
    </asp:EntityDataSource>
</asp:Content>
